import {IsArray, IsNotEmpty} from "class-validator";
import {ApiProperty} from "@nestjs/swagger";

export class userAddRoleDto {
    @ApiProperty({description: '角色id'})
    @IsArray({message: 'roleIds 类型错误，正确类型 number[]'})
    roleIds: number[]

    @ApiProperty({description: '用户id'})
    @IsNotEmpty({message: 'userId 不能为空'})
    userId: string
}
